import 'package:json_annotation/json_annotation.dart';


part 'base_data.g.dart';
@JsonSerializable(genericArgumentFactories: true)
class BaseData<T> {
  final T? data;
  final int? code;
  final String? message;

  const BaseData({this.data, this.code, this.message});

  factory BaseData.fromJson(
      Map<String, dynamic> json, T Function(dynamic json) fromJsonT) =>
      _$BaseDataFromJson(json, fromJsonT);

  Map<String, dynamic> toJson(
      Object? Function(T value) toJsonT,
      ) =>
      _$BaseDataToJson(this, toJsonT);
}
